<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			var num=prompt("请输入一个正整数：");
			
			if(!isNaN(num)&&parseInt(num)>0){
				alert(num+"最高位是"+num.substring(0,1));
			}else{
				alert("你输入的不是正整数!");
			}
		</script>
	</body>
</html>
